package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 客户管理自定义字段
 * </p>
 *
 * @author baiqiang
 * @since 2020-06-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("crm_define_field")
@ApiModel(value="CrmDefineField对象", description="客户管理自定义字段")
public class CrmDefineField extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "继承的自定义字段ID")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty(value = "公司ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "公司名称")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "系统字段名称")
    @TableField("sys_name")
    private String sysName;

    @ApiModelProperty(value = "字段名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "字段编码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "字段来源 crm:客户,linkMan:联系人,touch:类型记录,business:商机")
    @TableField("source")
    private String source;

    @ApiModelProperty(value = "字段分类")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "字段值")
    @TableField("val")
    private String val;

    @ApiModelProperty(value = "长度")
    @TableField("length")
    private String length;

    @ApiModelProperty(value = "排序")
    @TableField("sort")
    private Integer sort;


    @ApiModelProperty(value = "数据类型 1.基础 2.完全自定义 3.继承 4.继承自定义")
    @TableField("data_type")
    private Integer dataType;

    @ApiModelProperty(value = "页签 （常用信息 基本信息 等等）")
    @TableField("data_tab")
    private String dataTab;

    @ApiModelProperty(value = "继承来源编码(例如：crm.name , crm.jcc)")
    @TableField("parent_code")
    private String parentCode;
    @ApiModelProperty(value = "继承来源名称(例如：客户_客户名称)")
    @TableField("parent_name")
    private String parentName;



    @ApiModelProperty(value = "状态(0:正常 1:删除)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "启用 0：否，1：是")
    @TableField("on_off")
    private Boolean onOff;

    @ApiModelProperty(value = "APP启用 0：否，1：是")
    @TableField("on_app_off")
    private Boolean onAppOff;

    @ApiModelProperty(value = "是否可编辑（0：否，1：是）")
    @TableField("on_edit")
    private Boolean onEdit;

    @ApiModelProperty(value = "是否必填（0：否，1：是）")
    @TableField("on_fill")
    private Boolean onFill;

    @ApiModelProperty(value = "App是否必填（0：否，1：是）")
    @TableField("on_app_fill")
    private Boolean onAppFill;

    @ApiModelProperty(value = "是否导出（0：否，1：是）")
    @TableField("on_export")
    private Boolean onExport;

    @ApiModelProperty(value = "是否作为条件查询 1:是 0:否")
    @TableField("is_search")
    private Boolean isSearch;

    @ApiModelProperty(value = "APP是否作为条件查询 1:是 0:否")
    @TableField("is_app_search")
    private Boolean isAppSearch;

    @ApiModelProperty(value = "是否锁定 1:是 0:否")
    @TableField("on_locked")
    private Boolean onLocked;

    @ApiModelProperty(value = "是否租户控制 1:是 0:否 业务关心，租户不关心的字段")
    @TableField("is_user_controller")
    private Boolean isUserController;

    @ApiModelProperty(value = "列宽")
    @TableField("column_width")
    private Integer columnWidth;

    @ApiModelProperty(value = "描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建人Id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "创建人Id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;















}
